package com.neusoft.elmboot.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.Credit;
import com.neusoft.elmboot.po.UserCart;
import com.neusoft.elmboot.service.CreditService;
import com.neusoft.elmboot.service.UserCartService;

@RestController
@RequestMapping("/CreditController")
public class CreditController {
	@Autowired
	private CreditService creditService;
	
	@RequestMapping("/addByUserId")
	 public int addByUserId(Credit credit) throws Exception{
	 return creditService.addByUserId(credit);
	 }
	
	@RequestMapping("/getByUserId")
	 public Credit getByUserId(Credit credit) throws Exception{
	 return creditService.getByUserId(credit);
	 }
	
	@RequestMapping("/listByUserId")
	 public List<Credit> listByUserId(Credit credit) throws Exception{
	 return creditService.listByUserId(credit);
	 }

}
